<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>text-align属性说明</title>
    <style>

        .left {
            /*控制字显示在容器的左边*/
            text-align: left;
        }
        .right {
            /*控制字显示在容器的右边*/
            text-align: right;
        }
        .center {
            /*控制字显示在容器的中间*/
            text-align: center;
        }

    </style>
</head>
<body>
<p class="left"><strong>w3cschool</strong></p>
<p class="right"><strong>w3cschool</strong></p>
<p class="center"><strong>w3cschool</strong></p>
</body>
</html>